csseasevalue: fix wrong priority in steps easing transformation
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 10 Sep 2012 17:10:47 +0000 (13:10 -0400)
committerBenjamin Otte <otte@redhat.com>
Mon, 17 Sep 2012 18:39:13 +0000 (20:39 +0200)
We need to add parentheses around the ternary operator, or it will be
applied to the whole expression.

gtk/gtkcsseasevalue.c

index 19f979b06dc1a24138e86bc564c4c8c2d8c40668..cea938f001c1622f17119024a1ffdb6132a5b50c 100644 (file)
@@ -370,7 +370,7 @@ _gtk_css_ease_value_transform (const GtkCssValue *ease,
       }
     case GTK_CSS_EASE_STEPS:
       progress *= ease->u.steps.steps;
-      progress = floor (progress) + ease->u.steps.start ? 0 : 1;
+      progress = floor (progress) + (ease->u.steps.start ? 0 : 1);
       return progress / ease->u.steps.steps;
     default:
       g_assert_not_reached ();